#include <iostream>

int const maxn = 100;
int a[maxn][maxn];
int n, m;

int main()
{
    std::ios::sync_with_stdio(false);
    int T; std::cin >> T;
    for (int ti = 1; ti <= T; ti++) {
        std::cout << "Case #" << ti << ": ";
        std::cin >> n >> m;
        for (int i = 1; i <= n; i++)
            for (int j = 1; j <= m; j++) std::cin >> a[i][j];
    }
}

